import Vue from 'vue'
import Router from 'vue-router'
// import Home from '@/components/home/Home'
// const ImportFuncDemo = () => import(/* webpackChunkName: 'ImportFuncDemo' */ '../components/ImportFuncDemo')
// const ImportFuncDemo2 = () => import(/* webpackChunkName: 'ImportFuncDemo' */ '../components/ImportFuncDemo2')
const Home = () => import('@/components/home/Home')
const Message = () => import('@/components/message/Message')
const My = () => import('@/components/my/My')
const ShopCart = () => import('@/components/shopcart/ShopCart')

Vue.use(Router)

export default new Router({
  mode: 'history',
  // linkActiveClass: 'current',
  routes: [
    {
      path: '/',
      redirect: '/Home'
    },
    {
      path: '/Home',
      name: 'Home',
      component: Home
    },
    {
      path: '/Message',
      name: 'Message',
      component: Message
    },
    {
      path: '/My',
      name: 'My',
      component: My
    },
    {
      path: '/ShopCart',
      name: 'ShopCart',
      component: ShopCart
    }
  ]
})
